package org.example.est.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * parets
 * @author 
 */
@Data
public class Parets implements Serializable {
    private Long id;

    /**
     * 型号id
     */
    private Long modelid;

    /**
     * 配件名称
     */
    private String paretsname;

    /**
     * 价格
     */
    private BigDecimal price;

    /**
     * 供应商
     */
    private String supplier;

    /**
     * 图片
     */
    private String img;

    /**
     * 是否原厂（0:否,1:是,2:未知）
     */
    private Integer isorign;

    /**
     * 创建人
     */
    private Long createduserid;

    /**
     * 修改人
     */
    private Long updateduserid;

    /**
     * 创建时间
     */
    private Date createdtime;

    /**
     * 修改时间
     */
    private Date updatedtime;

    /**
     * 是否删除(0:否,1:是)
     */
    private Integer isdelete;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Parets other = (Parets) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getModelid() == null ? other.getModelid() == null : this.getModelid().equals(other.getModelid()))
            && (this.getParetsname() == null ? other.getParetsname() == null : this.getParetsname().equals(other.getParetsname()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getSupplier() == null ? other.getSupplier() == null : this.getSupplier().equals(other.getSupplier()))
            && (this.getImg() == null ? other.getImg() == null : this.getImg().equals(other.getImg()))
            && (this.getIsorign() == null ? other.getIsorign() == null : this.getIsorign().equals(other.getIsorign()))
            && (this.getCreateduserid() == null ? other.getCreateduserid() == null : this.getCreateduserid().equals(other.getCreateduserid()))
            && (this.getUpdateduserid() == null ? other.getUpdateduserid() == null : this.getUpdateduserid().equals(other.getUpdateduserid()))
            && (this.getCreatedtime() == null ? other.getCreatedtime() == null : this.getCreatedtime().equals(other.getCreatedtime()))
            && (this.getUpdatedtime() == null ? other.getUpdatedtime() == null : this.getUpdatedtime().equals(other.getUpdatedtime()))
            && (this.getIsdelete() == null ? other.getIsdelete() == null : this.getIsdelete().equals(other.getIsdelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getModelid() == null) ? 0 : getModelid().hashCode());
        result = prime * result + ((getParetsname() == null) ? 0 : getParetsname().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getSupplier() == null) ? 0 : getSupplier().hashCode());
        result = prime * result + ((getImg() == null) ? 0 : getImg().hashCode());
        result = prime * result + ((getIsorign() == null) ? 0 : getIsorign().hashCode());
        result = prime * result + ((getCreateduserid() == null) ? 0 : getCreateduserid().hashCode());
        result = prime * result + ((getUpdateduserid() == null) ? 0 : getUpdateduserid().hashCode());
        result = prime * result + ((getCreatedtime() == null) ? 0 : getCreatedtime().hashCode());
        result = prime * result + ((getUpdatedtime() == null) ? 0 : getUpdatedtime().hashCode());
        result = prime * result + ((getIsdelete() == null) ? 0 : getIsdelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", modelid=").append(modelid);
        sb.append(", paretsname=").append(paretsname);
        sb.append(", price=").append(price);
        sb.append(", supplier=").append(supplier);
        sb.append(", img=").append(img);
        sb.append(", isorign=").append(isorign);
        sb.append(", createduserid=").append(createduserid);
        sb.append(", updateduserid=").append(updateduserid);
        sb.append(", createdtime=").append(createdtime);
        sb.append(", updatedtime=").append(updatedtime);
        sb.append(", isdelete=").append(isdelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}